let latlngData: any = {};

export const setLatencyData = (data: any) => {
  latlngData = data;
  const latencyCurveData: any = {
    'HongKong-Singapore': {
      start: latlngData['HongKong'],
      end: latlngData['Singapore'],
      t: [18.3, 95.9],
      color: null,
    },
    'HongKong-Tokyo': {
      start: latlngData['HongKong'],
      end: latlngData['Tokyo'],
      t: [36, 121],
      color: null,
    },
    'HongKong-London': {
      start: latlngData['HongKong'],
      end: latlngData['London'],
      t: [63, 77],
      color: null,
    },
    'Tokyo-London': {
      start: latlngData['Tokyo'],
      end: latlngData['London'],
      t: [70, 84],
      color: null,
    },
    'Tokyo-Chicago': {
      start: latlngData['Tokyo'],
      end: latlngData['Chicago'],
      t: [75.8, 27.7],
      color: null,
    },
    'Tokyo-Sydney': {
      start: latlngData['Tokyo'],
      end: latlngData['Sydney'],
      t: [10.8, 185],
      color: null,
    },
    'Tokyo-Singapore': {
      start: latlngData['Tokyo'],
      end: latlngData['Singapore'],
      t: [7.36, 142],
      color: null,
    },
    'London-NewYork': {
      start: latlngData['London'],
      end: latlngData['NewYork'],
      t: [62, -45],
      color: null,
    },
    'London-Singapore': {
      start: latlngData['London'],
      end: latlngData['Singapore'],
      t: [9.5, 22],
      color: null,
    },
    'Singapore-Sydney': {
      start: latlngData['Singapore'],
      end: latlngData['Sydney'],
      t: [3.16, 144],
      color: null,
    },
    'Sydney-Chicago': {
      start: latlngData['Sydney'],
      end: latlngData['Chicago'],
      t: [-50, 5],
      color: null,
    },
    'ShangHai-Dalian': {
      start: latlngData['ShangHai'],
      end: latlngData['Dalian'],
      t: [35.496456, 124.848633],
      color: null,
    },
    'ShangHai-BeiJing': {
      start: latlngData['ShangHai'],
      end: latlngData['BeiJing'],
      t: [36, 120],
      color: null,
    },
    'ShangHai-ZhengZhou': {
      start: latlngData['ShangHai'],
      end: latlngData['ZhengZhou'],
      t: [36, 120],
      color: null,
    },
    'ShangHai-GuangZhou': {
      start: latlngData['ShangHai'],
      end: latlngData['GuangZhou'],
      t: [30, 113],
      color: null,
    },
    'ShangHai-DongGuan': {
      start: latlngData['ShangHai'],
      end: latlngData['DongGuan'],
      t: [30, 113],
      color: null,
    },
  };
  return latencyCurveData;
};
